package demo1104.demo03;

import java.awt.event.ItemEvent;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;

/**
 * @author JYH
 * @version 1.0
 * @date 2022/11/4 16:27
 */
public class TestStream02 {
    public static void main(String[] args) {
        List<String> list = new ArrayList<>();
        Collections.addAll(list,"张三","李四","王五五");

        list.stream().filter(item->item.length()<3).filter(item->item.startsWith("张")).forEach(item-> System.out.println(item));
    }
}
